package com.blog.common.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * @author dc
 * @Classname BasePoJo
 * @Date 2020/7/30 19:58
 */
public class BasePoJo implements Serializable {
    private static final long serialVersionUID = -7745452989826664813L;
    private String id;
    private Date createTime;
    private Date updateTime;

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setNewId() {
        this.setId(String.valueOf(Math.abs(UUID.randomUUID().getMostSignificantBits())));
    }
}
